package com.beordie.model;

import com.beordie.utils.DateFormatUtils;

import java.sql.Time;
import java.util.Date;

/**
 * @Classname FormateNotice
 * @Description TODO
 * @Date 2021/7/14 17:12
 * @Created 30500
 */
public class FormatNotice {
    private Integer id;
    private String number;
    private String day;
    private String time;
    private String location;
    private String record;
    private Driver driver;
    private Police police;
    private Car car;

    public FormatNotice(Notice notice) {
        this.id = notice.getId();
        this.number = notice.getNumber();
        this.day = DateFormatUtils.getDateString(notice.getDay());
        this.time = notice.getTime().toString().substring(0, 5);
        this.location = notice.getLocation();
        this.record = notice.getRecord();
        this.driver = notice.getDriver();
        this.police = notice.getPolice();
        this.car = notice.getCar();
    }

    @Override
    public String toString() {
        return "FormatNotice{" +
                "id=" + id +
                ", number='" + number + '\'' +
                ", day='" + day + '\'' +
                ", time='" + time + '\'' +
                ", location='" + location + '\'' +
                ", record='" + record + '\'' +
                ", driver=" + driver +
                ", police=" + police +
                ", car=" + car +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getDay() {
        return day;
    }

    public void setDay(String day) {
        this.day = day;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getRecord() {
        return record;
    }

    public void setRecord(String record) {
        this.record = record;
    }

    public Driver getDriver() {
        return driver;
    }

    public void setDriver(Driver driver) {
        this.driver = driver;
    }

    public Police getPolice() {
        return police;
    }

    public void setPolice(Police police) {
        this.police = police;
    }

    public Car getCar() {
        return car;
    }

    public void setCar(Car car) {
        this.car = car;
    }
}
